package com.cssiot.webApi.config;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//@Configuration
// prefix = value,看源码
//@ConfigurationProperties(prefix = "gzz01")
@PropertySource(value="classpath:config.properties",ignoreResourceNotFound = true)
//@EnableConfigurationProperties({PropertySourceConfig.class})   
@Component
public class PropertySourceConfig implements Serializable{
	@Value(value = "test1")
    private String test1;
	@Value(value = "test2")
    private String test2;
	public String getTest1() {
		return test1;
	}
	public void setTest1(String test1) {
		this.test1 = test1;
	}
	public String getTest2() {
		return test2;
	}
	public void setTest2(String test2) {
		this.test2 = test2;
	}
	@Override
	public String toString() {
		return "PropertySourceConfig [test1=" + test1 + ", test2=" + test2 + ", getTest1()=" + getTest1()
				+ ", getTest2()=" + getTest2() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode()
				+ ", toString()=" + super.toString() + "]";
	}
    
    

}